<template>
  <div id="qweee" style="width: 100%-hh; height: 500px"></div>
</template>

<script lang="ts" setup>
import * as echarts from "echarts";
import { onMounted, toRefs } from "vue";
type EChartsOption = echarts.EChartsOption;
const props =defineProps({
 list:Array
})
console.log("222222222222222",props);

  onMounted(() => {
    var chartDom = document.getElementById("qweee")!;
    var myChart = echarts.init(chartDom);
    var option: EChartsOption;
    option = {
      tooltip: {
        trigger: "axis",
      },
      legend: {
        data: ["订单数量", "销售额"],
      },
      grid: {
        left: "3%",
        right: "4%",
        bottom: "3%",
        containLabel: true,
      },
      toolbox: {
        feature: {
          saveAsImage: {},
        },
      },
      xAxis: {
        type: "category",
        boundaryGap: false,
        data: [
          "2019-01-1",
          "2019-01-2",
          "2019-01-3",
          "2019-01-4",
          "2019-01-5",
          "2019-01-6",
        ],
      },
      yAxis: {
        type: "value",
      },
      series: [
        {
          name: "订单数量",
          type: "line",
          stack: "Total",
          data: [120, 132, 101, 134, 90, 230, 210],
        },
        {
          name: "销售额",
          type: "line",
          stack: "Total",
          data: [220, 182, 191, 234, 290, 330, 310],
        },
      ],
    };

    option && myChart.setOption(option);
  });
</script>

<style>
</style>